package org.adoxx.adows.client.main; import java.io.IOException; import java.io.InputStream; import java.util.Properties; import javax.xml.rpc.ServiceException; import org.adoxx.adows.client.ADOxxWebService; import com.boc_eu.adoweb.adows.adoscript.GetTOC; /** * @author wutz * * Sample implementation to retreive the table of content from an ADOxx * based tool via web-service interaction FIXME: the return XML is * currently available as a XML in String format, in case further steps * are needed, parsing of the return needs to be implemented. * */ public class RunADOxxServiceInteractionTOC { public static void main(String[] args) throws ServiceException, IOException { // load property for endpoint reference Properties prop = new Properties(); InputStream inputStream = RunADOxxServiceInteractionModelDocuXML.class.getClassLoader().getResourceAsStream("config.properties"); prop.load(inputStream); // Construct the ADOxx service as a singleton in the application. ADOxxWebService service = ADOxxWebService.getInstance("http://localhost:8181/"); // Create the interaction object, using the service as an input, // implictly triggers the service interaction GetTOC toc = new GetTOC(service); // Handle the results System.out.println(toc.getResult()); } }